<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li <if condition="$status eq 0">class="active"</if>><a href="{:U('index',array('status'=>0))}">订单列表</a></li>
			<li <if condition="$status eq 1">class="active"</if>><a href="{:U('index',array('status'=>1))}">待审核</a></li>
			<li <if condition="$status eq 2">class="active"</if>><a href="{:U('index',array('status'=>2))}">印刷中</a></li>
			<li <if condition="$status eq 3">class="active"</if>><a href="{:U('index',array('status'=>3))}">已完成</a></li>
			<li <if condition="$status eq 4">class="active"</if>><a href="{:U('index',array('status'=>4))}">已取消</a></li>
		</ul>
		<form class="well form-search" method="GET" action="/index.php">
			<input type="hidden" name="g" value="Qrcode">
			<input type="hidden" name="m" value="AdminOrder">
			<input type="hidden" name="a" value="index">
			<input type="hidden" name="status" value="{$status}">
			<input type="text" name="name" value="{$name}" placeholder="请输入产品名称">&nbsp;
			<input type="submit" class="btn btn-primary" value="搜索" />
		</form>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>产品名称</th>
						<th>公司名称</th>
						<th>二维码数量</th>
						<th>印刷日期</th>
						<th>批次号</th>
						<th>状态</th>
						<th>添加日期</th>
						<th align="center">操作</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="list" item="vo">
					<tr>
						<td>{$pro[$vo['pid']]}</td>
						<td>{$users[$vo['uid']]}</td>
						<td>{$vo.qrcode}</td>
						<td>{$vo.typedate}</td>
						<td>{$vo.batch}</td>
						<td>
							<span class="label
							<if condition="$vo['status'] eq 1">
							label-info
							<elseif condition="$vo['status'] eq 2"/>
							label-warning
							<elseif condition="$vo['status'] eq 3"/>
							label-primary
							<elseif condition="$vo['status'] eq 4"/>
							label-danger
							</if>
							">
								{$status_arr[$vo['status']]}
							</span>
						</td>
						<td>
							{$vo.createtime}
						</td>
						<td>
							<a href="{:U('AdminOrder/edit',array('id'=>$vo['id']))}">编辑</a>
							<a href="{:U('AdminOrder/export',array('id'=>$vo['id']))}">导出二维码</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript">
	function showewm(id,code) {
		var http = window.location.protocol;
		var host = window.location.host;
		var url  = escape(http+'//'+host+'/index.php?g=qrcode&m=company&a=index&id='+id+'&code='+code);
		console.log(url);
		Wind.use("artDialog",function(){
	        art.dialog({
	            title: '二维码查看',
	            fixed: true,
	            width:"300px",
	            height: '320px',
	            id:"image_priview",
	            lock: false,
	            background:"#CCCCCC",
	            opacity:0,
	            content: '<img src="/qrcode.php?data='+url+'" width="290px" height="290px"/><br/>右击鼠标，点图片另存为，可以保存图片',
	        });
	    });
	}
	</script>
</body>
</html>